import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import net.miginfocom.swing.MigLayout;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class MainMenu extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainMenu frame = new MainMenu();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MainMenu() {
		setTitle("Main Menu");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new MigLayout("", "[][][][][]", "[][][][][][]"));
		
		JButton btnRegistration = new JButton("Registration");
		contentPane.add(btnRegistration, "cell 2 2,growx");
		
		JButton btnGurdianApplication = new JButton("Gurdian Application");
		btnGurdianApplication.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
				ApplicationGUI application = new ApplicationGUI();
			}
		});
		contentPane.add(btnGurdianApplication, "cell 4 2");
		
		JButton btnSupervisorStation = new JButton("Supervisor Station");
		btnSupervisorStation.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
				SupervisorGUI supervisorScreen = new SupervisorGUI();
				supervisorScreen.setVisible(true);
			}
		});
		contentPane.add(btnSupervisorStation, "cell 2 5");
		
		JButton btnEnterexitRide = new JButton("Enter\\Exit Ride");
		contentPane.add(btnEnterexitRide, "cell 4 5,growx");
	}

}
